<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand hidden-sm">电影展示系统</a>
    </div>
    <div class="navbar-collapse collapse" role="navigation">
      <ul class="nav navbar-nav">
        <li class="<%- title=='index' ? 'active' : '' %>"><a href="/">主页</a></li>
        <% if (!username) { %>
          <li class="<%- title=='register' ? 'active' : '' %>"><a href="/register">注册</a></li>
          <li class="<%- title=='login' ? 'active' : '' %>"><a href="/login">登陆</a></li>
        <% } else { %>
          <li class="<%- title=='movies' ? 'active' : '' %>"><a href="/movies">电影列表</a></li>
          <li class="<%- title=='mlist' ? 'active' : '' %>"><a href="/comment/mlist">评论列表</a></li>
        <% } %>
      </ul>
      <ul class="nav navbar-nav navbar-right hidden-sm">
        <% if (username) { %>
          <li class="<%- title=='mine' ? 'active' : '' %>"><a href="/mine/">个人中心</a></li>
          <li class="<%- title=='about' ? 'active' : '' %>"><a href="/about/">关于我们</a></li>
          <li><a href="/logout">退出登录</a></li>
        <% } %>
      </ul>
    </div>
  </div>
</div>